import base from "/@/api/base";
import Axios from "/@/utils/Axios";

// 用户统计接口
export function getUserStatistics(): Promise<any> {
  return Axios.get(base.getUserStatistics);
}

// 文章统计接口
export function getArticleStatistics(): Promise<any> {
  return Axios.get(base.getArticleStatistics);
}

// 资源统计接口
export function getResourceStatistics(): Promise<any> {
  return Axios.get(base.getResourceStatistics);
}

// 成就统计接口
export function getAchievementStatistics(): Promise<any> {
  return Axios.get(base.getAchievementStatistics);
}

// 综合统计接口
export function getOverviewStatistics(): Promise<any> {
  return Axios.get(base.getOverviewStatistics);
}

// 成果类型饼图数据接口
export function getAchievementTypePie(): Promise<any> {
  return Axios.get('/backapi/statistics/achievements/type-pie');
}

// 用户成果量柱状图数据接口
export function getAchievementUserBar(): Promise<any> {
  return Axios.get('/backapi/statistics/achievements/user-bar');
}

// 年级成果量柱状图数据接口
export function getAchievementGradeBar(): Promise<any> {
  return Axios.get('/backapi/statistics/achievements/grade-bar');
}

// 任务统计接口
export function getTasksStatistics(): Promise<any> {
  return Axios.get('/backapi/statistics/tasks');
}

// 用户任务完成平均时间统计接口
export function getTasksAvgCompletionTime(): Promise<any> {
  return Axios.get('/backapi/statistics/tasks/avg-completion-time');
}

// 用户任务完成数量统计接口
export function getTasksUserCompletion(): Promise<any> {
  return Axios.get('/backapi/statistics/tasks/user-completion');
}

// 年级任务完成量饼图数据接口
export function getTasksGradePie(): Promise<any> {
  return Axios.get('/backapi/statistics/tasks/grade-pie');
}
